home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / MAPEDIT.ZIP / SAMPGAME / CYBLOW.C < prev    next >
C/C++ Source or Header  |  1992-04-11  |  902b  |  64 lines

  1. #include "cyber.h"
  2.  
  3. exit_prog()
  4. {
  5.     mousecursor(0);
  6.     vmode(3);
  7.     exit(0);
  8. }
  9.  
  10. show_screen()
  11. {
  12.     vwait();
  13.     memcpy(scrptr,bufptr,64000);
  14. }
  15.  
  16. vmode(int videomode)
  17. {
  18.     union REGS reg;
  19.     reg.h.ah = 0;
  20.     reg.h.al = videomode;
  21.     int86 (0x10,®,®);
  22. }
  23.  
  24. load_map()
  25. {
  26.     FILE *fptr;
  27.     if(!(fptr=fopen("map.dat","rb")))
  28.     {
  29.         vmode(3);
  30.         printf("could not open file map.dat !");
  31.         exit(0);
  32.     }
  33.  
  34.     fread(mapptr,sizeof(char),64000,fptr);
  35.     fclose(fptr);
  36.     return;
  37. }
  38.  
  39. save_map()
  40. {
  41.     FILE *fptr;
  42.     if(!(fptr=fopen("map.dat","wb+")))
  43.     {
  44.         vmode(3);
  45.         printf("could not open file map.dat !");
  46.         exit(0);
  47.     }
  48.  
  49.     fwrite(mapptr,sizeof(char),64000,fptr);
  50.     fclose(fptr);
  51.     return;
  52. }
  53.  
  54.  
  55.  
  56. vwait()
  57. {
  58.     while((inp(0x3da)&8))
  59.         ;;
  60.     while(!(inp(0x3da)&8))
  61.         ;;
  62. }
  63.  
  64.